﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//在http://dev.yesky.com/msdn/139/2412639.shtml中有详细说明
//使用以下方法调用：
//protected void Page_Load(object sender, EventArgs e)
//{
// ControlHelper.AddStyleSheet(this.Page, "css/projectPage.css"); 
//} 
//
/// <summary>
/// Class1 的摘要说明
/// </summary>

    static public class CssInMasterPage
    {
        static public void AddStyleSheet(Page page, string cssPath)
        {
            HtmlLink link = new HtmlLink();
            link.Href = cssPath;
            link.Attributes["rel"] = "stylesheet";
            link.Attributes["type"] = "text/css";
            page.Header.Controls.Add(link);
        }
    } 


